var ItemView = Backbone.View.extend ({
	tagName: 'li',
	className: 'items',
	par:'',
	initialize: function (opts) {
		this.par  = opts.parent;
		if(this.model.get('counter') != '1' && this.model.get('counter') != '0'){
			var string = this.model.get('name') + ' ' + this.model.get('price') + ' uah quantity = ' + this.model.get(					'counter');
		} else {
			var string = this.model.get('name') + ' ' + this.model.get('price') + ' uah';
		}
		this.el.innerText = string;
		this.$el.on('click', function(obj) {
			                   return function() {
								  obj.onClick();       
		                       };
						   }(this)
							 );
	},
	onClick: function() {
		this.par.renderAddItem(this.model);
	}
});